﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.Composition;
using WPFSchematics.Definition.Common;

namespace WPFSchematics.Definition.Models
{
    public interface IExtendCommandMetaData
    {
        string CommandIdentifier { get; }
    }

    [MetadataAttribute]
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]
    public class ExtendCommandAttribute : ExportAttribute, IExtendCommandMetaData
    {
        public ExtendCommandAttribute() : base(typeof (IExtendCommand))
        {
        }
        public ExtendCommandAttribute(Type contractType) : base(contractType)
        {
        }
        public ExtendCommandAttribute(string contractName)
            : base(contractName, typeof(IExtendCommand))
        {
        }


        #region IExtendCommandMetaData 成员

        public string CommandIdentifier
        {
            get;
            set;
        }

        #endregion
    }
}
